Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused Workbench Components #624

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

MariaSemple
Copy link
Contributor

This PR removes unused Workbench components to reduce the surface area for security vulnerabilities in the images. It also adds an "RStudio Pro session"-only image for certain use-cases.

Copy link
Collaborator

@ianpittwood ianpittwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. Just a few comments:

  • We should update the sed targets in the root Justfile so versions get updated appropriately in the new workbench-session-rstudio-pro images.
  • We should eventually add these builds into the workflows too. That should be as easy as adding in some more entries to the matrices.
  • Is it possible we'll add more session images for Workbench? If so, it may be best to layer this in as a subdirectory like workbench-session/rstudio-pro.

@@ -5,7 +5,7 @@ ARG PYTHON_VERSION_ALT=3.8.15
ARG SRC_IMAGE_NAME=product-base-pro
ARG REGISTRY=ghcr.io
FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:centos7-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT}
LABEL maintainer="RStudio Docker <[email protected]>"`
LABEL maintainer="RStudio Docker <[email protected]>"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind changing this to "@posit.co" while we're at it?

rm -rf /usr/lib/rstudio-server/www-workspaces
rm -rf /usr/lib/rstudio-server/db
rm -rf /usr/lib/rstudio-server/conf
rm -rf /usr/lib/rstudio-server/extras
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line at end of file

Comment on lines +4 to +29
rm /usr/lib/rstudio-server/bin/rserver-saml
rm /usr/lib/rstudio-server/bin/rserver-openid
rm /usr/lib/rstudio-server/bin/librclient.so
rm /usr/lib/rstudio-server/bin/librserver.so
rm /usr/lib/rstudio-server/bin/license-manager
rm /usr/lib/rstudio-server/bin/license-manager.conf
rm /usr/lib/rstudio-server/bin/locktester
rm /usr/lib/rstudio-server/bin/migrate.sh
rm /usr/lib/rstudio-server/bin/pamtester
rm /usr/lib/rstudio-server/bin/rpcsend
rm /usr/lib/rstudio-server/bin/rserver
rm /usr/lib/rstudio-server/bin/rserver-acls
rm /usr/lib/rstudio-server/bin/rserver-admin
rm /usr/lib/rstudio-server/bin/rserver-db
rm /usr/lib/rstudio-server/bin/rserver-encrypt
rm /usr/lib/rstudio-server/bin/rserver-http
rm /usr/lib/rstudio-server/bin/rserver-monitor
rm /usr/lib/rstudio-server/bin/rserver-pam
rm /usr/lib/rstudio-server/bin/rserver-session-reaper
rm /usr/lib/rstudio-server/bin/rstudio-kubernetes-launcher
rm /usr/lib/rstudio-server/bin/rstudio-launcher
rm /usr/lib/rstudio-server/bin/rstudio-launcher.sh
rm /usr/lib/rstudio-server/bin/rstudio-local-launcher
rm /usr/lib/rstudio-server/bin/rstudio-server
rm /usr/lib/rstudio-server/bin/rstudio-slurm-launcher
rm /usr/lib/rstudio-server/bin/run-diagnostics
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these also have -f?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change it, but for some reason only the r-versions file had trouble

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's strange. Is it the only one present at the time this runs perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'm guessing is a permissions thing. The other ones are definitely present before this runs

rm -rf /usr/lib/rstudio-server/bin/code-server
rm -rf /usr/lib/rstudio-server/bin/vscode-workbench-ext
rm /usr/lib/rstudio-server/bin/jupyter-session-run
rm /usr/lib/rstudio-server/bin/vscode-session-run
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no extra line

@CLAassistant
Copy link

CLAassistant commented Aug 15, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants